'use strict';
exports.main = async (params, context) => {
	//event为客户端上传的参数
	const db = uniCloud.database();
	var res =await db.collection("opendb-news-articles").add({
		user_id: params.uid,
		title: params.title,
		content: params.content,
		article_status: 0,
		view_count: 0,
		like_count: 0,
		is_sticky: 1,
		comment_status: 0,
		comment_count: 0
	});
	//返回数据给客户端
	return res
};
